package TD3;

public class DoubletComparable extends Doublet implements Comparable{

	/**
	 * Construit un doublet comparable d'entiers.
	 * @param a
	 * @param b
	 */
	public DoubletComparable(int a, int b) {
		super(a,b);
	}

	
	@Override
	public int compareTo(Object arg0) {
		if(!(arg0 instanceof DoubletComparable)){
			return 0;
		}
		DoubletComparable d = (DoubletComparable)arg0;
		return (int)Math.signum(this.produit() - d.produit());
	}
	
	public static void main(String[] args){
				
	}
}
